package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.HaDrugAcceptMapper;
import com.ruoyi.system.domain.HaDrugAccept;
import com.ruoyi.system.service.IHaDrugAcceptService;

/**
 * 收货质检Service业务层处理
 * 
 * @author 报销为
 * @date 2025-11-26
 */
@Service
public class HaDrugAcceptServiceImpl implements IHaDrugAcceptService 
{
    @Autowired
    private HaDrugAcceptMapper haDrugAcceptMapper;

    /**
     * 查询收货质检
     * 
     * @param acceptid 收货质检主键
     * @return 收货质检
     */
    @Override
    public HaDrugAccept selectHaDrugAcceptByAcceptid(Long acceptid)
    {
        return haDrugAcceptMapper.selectHaDrugAcceptByAcceptid(acceptid);
    }

    /**
     * 查询收货质检列表
     * 
     * @param haDrugAccept 收货质检
     * @return 收货质检
     */
    @Override
    public List<HaDrugAccept> selectHaDrugAcceptList(HaDrugAccept haDrugAccept)
    {
        return haDrugAcceptMapper.selectHaDrugAcceptList(haDrugAccept);
    }

    /**
     * 新增收货质检
     * 
     * @param haDrugAccept 收货质检
     * @return 结果
     */
    @Override
    public int insertHaDrugAccept(HaDrugAccept haDrugAccept)
    {
        haDrugAccept.setCreateTime(DateUtils.getNowDate());
        return haDrugAcceptMapper.insertHaDrugAccept(haDrugAccept);
    }

    /**
     * 修改收货质检
     * 
     * @param haDrugAccept 收货质检
     * @return 结果
     */
    @Override
    public int updateHaDrugAccept(HaDrugAccept haDrugAccept)
    {
        haDrugAccept.setUpdateTime(DateUtils.getNowDate());
        return haDrugAcceptMapper.updateHaDrugAccept(haDrugAccept);
    }

    /**
     * 批量删除收货质检
     * 
     * @param acceptids 需要删除的收货质检主键
     * @return 结果
     */
    @Override
    public int deleteHaDrugAcceptByAcceptids(Long[] acceptids)
    {
        return haDrugAcceptMapper.deleteHaDrugAcceptByAcceptids(acceptids);
    }

    /**
     * 删除收货质检信息
     * 
     * @param acceptid 收货质检主键
     * @return 结果
     */
    @Override
    public int deleteHaDrugAcceptByAcceptid(Long acceptid)
    {
        return haDrugAcceptMapper.deleteHaDrugAcceptByAcceptid(acceptid);
    }
}
